f2e425
@@ -44,8 +44,8 @@
public class S3Component extends UriEndpointComponent {
         }
         configuration.setBucketName(remaining);
 
-        if (configuration.getAmazonS3Client() == null) {
-            throw new IllegalArgumentException("AmazonS3Client must be specified");
+        if (configuration.getAmazonS3Client() == null && (configuration.getAccessKey() == null || configuration.getSecretKey() == null)) {
+            throw new IllegalArgumentException("AmazonS3Client or accessKey and secretKey must be specified");
         }
 
         S3Endpoint endpoint = new S3Endpoint(uri, this, configuration);
